Security News
Supply Chain Attack Detected in @solana/web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
tiny-json-http
Advanced tools
Minimalist `HTTP` client for `GET`, `POST`, `PUT`, `PATCH` and `DELETE` `JSON` payloads
Minimalist HTTP
client for GET
, POST
, PUT
, PATCH
and DELETE
JSON
payloads
npm i tiny-json-http --save
tiny.get(options[, callback])
tiny.head(options[, callback])
tiny.options(options[, callback])
tiny.post(options[, callback])
tiny.put(options[, callback])
tiny.patch(options[, callback])
tiny.del(options[, callback)]
*callback is optional, tiny methods will return a promise if no callback is provided
url
requireddata
form vars for tiny.post
, tiny.put
, tiny.patch
, and tiny.delete
otherwise querystring vars for tiny.get
headers
key/value map used for headers (including support for uploading files with multipart/form-data
)buffer
if set to true
the response body is returned as a buffererr
a real javascript Error
if there was onedata
an object with headers
and body
keyscallback
is provided to the tiny-json-http methods, a promise is returnedvar tiny = require('tiny-json-http')
var url = 'http://www.randomkittengenerator.com'
;(async function _iife() {
try {
console.log(await tiny.get({url}))
} catch (err) {
console.log('ruh roh!', err)
}
})();
var tiny = require('tiny-json-http')
var url = 'http://www.randomkittengenerator.com'
tiny.get({url}, function _get(err, result) {
if (err) {
console.log('ruh roh!', err)
}
else {
console.log(result)
}
})
Check out the tests for more examples! :heart_decoration:
FAQs
Minimalist `HTTP` client for `GET`, `POST`, `PUT`, `PATCH` and `DELETE` `JSON` payloads
We found that tiny-json-http demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.